<?php if (!defined('THINK_PATH')) exit();?><!--<meta http-equiv="refresh" content="1"/>-->
<link href="/Public/Home/css/sane.css"  type="text/css" rel="stylesheet"/>
<script src="/Public/js/jquery-1.11.3.min.js" type="text/javascript"></script>
<link href="/Public/css/bootstrap.css"  type="text/css" rel="stylesheet"/>
<script src="/Public/js/bootstrap.js" type="text/javascript"></script>
<script src="/Public/js/layer/layer.js" type="text/javascript"></script>
<script src="/Public/js/jquery.js" type="text/javascript"></script>
<script src="/Public/Home/js/bookRefer.js" type="text/javascript"></script>
<div class="c-main-left-content">
    <div class="con_title">
        <h3>书籍购买</h3>
    </div>
    <div class="title_tip">
        <img class="record_icon" src="/Public/img/record_01.jpg"/>
        <span class="record_news">书籍是人类思想的宝库。</span>
    </div>

    <div class="box_box">
        <div class="show_sousuo">
            <form action="<?php echo U('Home/BookManage/bookRadio');?>" method="post">
                <span id="select_title1">书籍名称：</span>
                <input type="text" name="book_name">
                <select name="select_title" id="select_title">
                    <option value="book_type_id">图书类型</option>
                    <option value="book_case_id">图书书架</option>
                    <option value="book_isbn_id">出版社</option>
                </select>
                <select name="book_type_id" class="city" >
                    <option value="">请选择</option>
                    <?php if(is_array($_getBookTypeTableInfo)): $i = 0; $__LIST__ = $_getBookTypeTableInfo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vo['book_type_id']); ?>"><?php echo ($vo['book_type_name']); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                </select>
                <select name="book_case_id" class="city" >
                    <option value="">请选择</option>
                    <?php if(is_array($_getBookCaseTableInfo)): $i = 0; $__LIST__ = $_getBookCaseTableInfo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$zo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($zo['book_case_id']); ?>"><?php echo ($zo['book_case_name']); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                </select>
                <select name="book_isbn_id" class="city">
                    <option value="">请选择</option>
                    <?php if(is_array($_getBookIsbnTableInfo)): $i = 0; $__LIST__ = $_getBookIsbnTableInfo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$fo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($fo['book_isbn_id']); ?>"><?php echo ($fo['book_isbn_name']); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                </select>
                <div class="read_submit" id="show_left">
                    <img src="/Public/Admin/img/record_02.jpg" alt="搜索">
                    <input type="submit" value="查询" >
                    <a href="#" data-toggle="modal" data-target="#myModal">购买规则</a>
                </div>
            </form>
        </div>
        <!-- Modal -->
        <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title model-attestation" id="myModalLabel">书籍购买规则</h4>
                    </div>
                    <div class="model_info">
                        <span>&nbsp;&nbsp;1. 实名认证</span><br/>
                        <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;购书之前先进行网站实名认证，才允许书籍购买，实名认证信息将受本网站保护系统进行实时保护，您可以放心购买书籍。</span><br/>
                        <span>&nbsp;&nbsp;2. 支付方式</span><br/>
                                        <span>
                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;本书店可以进行两种支付方式，分别是：货到付款和银联支付，采用货到付款可以不进行银行卡绑定，采用银联支付必须进行银行卡绑定。
                                        </span><br/>
                        <span>&nbsp;&nbsp; 3. 购书详情</span><br/>
                                       <span>
                                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;根据本网站的书籍录入不同，存在的书籍能够进行无限制的购买，本网站不存在的书籍，我们会尽快满足大家的需求。
                                       </span><br/>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    </div>
                </div>
            </div>
        </div>
        <!----->
        <div class="book_show_box">
            <div class="book_show_span">
                <!--<span>书籍信息<c id="c_color">（点击图书名称查看详情）</c></span>-->
                <span>书籍信息</c></span>
            </div>
            <div class="height_con">
                <table class="book_show_table">
                    <tr>
                        <!--<th>条形码</th>-->
                        <th>图书名称</th>
                        <th>图书类型</th>
                        <th>图书书架</th>
                        <th>出版社</th>
                        <th>图书数量</th>
                        <th>操作</th>
                    </tr>
                    <?php if(is_array($_getBookShowInfo)): $i = 0; $__LIST__ = $_getBookShowInfo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
                            <!--<td><?php echo ($vo['book_barcode']); ?></td>-->
                            <td class="court_name">
                                <?php echo ($vo['book_name']); ?>
                            </td>
                            <td>
                                <?php if(is_array($_getBookTypeTableInfo)): $i = 0; $__LIST__ = $_getBookTypeTableInfo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$so): $mod = ($i % 2 );++$i; if($vo['book_type_id'] == $so['book_type_id']): echo ($so['book_type_name']); endif; endforeach; endif; else: echo "" ;endif; ?>
                            </td>
                            <td>
                                <?php if(is_array($_getBookCaseTableInfo)): $i = 0; $__LIST__ = $_getBookCaseTableInfo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$so): $mod = ($i % 2 );++$i; if($vo['book_case_id'] == $so['book_case_id']): echo ($so['book_case_name']); endif; endforeach; endif; else: echo "" ;endif; ?>
                            </td>
                            <td>
                                <?php if(is_array($_getBookIsbnTableInfo)): $i = 0; $__LIST__ = $_getBookIsbnTableInfo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$so): $mod = ($i % 2 );++$i; if($vo['book_isbn_id'] == $so['book_isbn_id']): echo ($so['book_isbn_name']); endif; endforeach; endif; else: echo "" ;endif; ?>
                            </td>
                            <td><?php echo ($vo['book_number']); ?></td>
                            <td>
                                <a href="<?php echo U('Home/BookManage/buyBookInfo',array('book_id'=>$vo['book_id']));?>" class="wyz_a"><button class="wyz_bb">购买</button></a>
                            </td>
                        </tr><?php endforeach; endif; else: echo "" ;endif; ?>
                </table>
            </div>
        </div>
    </div>
</div>
<script>
    $(document).ready(function() {
        $("#select_title").change(function () {
            $("#select_title option").each(function (i, o) {
                if ($(this).attr("selected")) {
                    $(".city").hide();
                    $(".city").eq(i).show();
                }
            });
        });
        $("#select_title").change();
    });
</script>